home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / YUKONBAT.ZIP / RUN1.BAT < prev   
DOS Batch File  |  1993-02-28  |  12KB  |  441 lines

  1. @Echo Off
  2.  
  3. REM ┌───────────────────────────────────────────────────────────────┐
  4. REM │ Batch File For Yukon Ho! +44-232-768163  Fido 2:440/59.0      │
  5. REM │      Running RemoteAccess 1.20 and FrontDoor 2.10             │
  6. REM │                 in shell to mailer mode                       │
  7. REM │                                                               │
  8. REM └───────────────────────────────────────────────────────────────┘
  9.  
  10.  
  11. REM ┌───────────────────────────────────────────────────────────────┐
  12. REM │  This is where I set the environment variables..............  │
  13. REM └───────────────────────────────────────────────────────────────┘
  14.  
  15.  
  16. Set port=2
  17. Set ra=d:\ra
  18. Set fd=d:\fd
  19. Set TCNODE=1
  20. Set spat=c:\utils
  21. Set TZ=GMT0BST
  22. Set CZCONFIG=d:\czip\czip.cfg
  23. Set dszport=2
  24. Set DSZLOG=d:\ra\dsz.log
  25. Set POINTNET=4405
  26. Set tmp=n:\
  27. Set semaj=d:\ra\semaj
  28. Set Pcbdoor=Prodoor
  29. Set ZSE=d:\ra\zcr
  30. Set FDOPT=INTL
  31.  
  32. ratsr 1
  33.  
  34.  
  35. :start
  36.  
  37. REM ┌──────────────────────────────────────────────────────────────────┐
  38. REM │ Before running the BBS I check for and tidy some files.          │
  39. REM │ I then fire up RA in shell to mailer mode. With the label start. │
  40. REM └──────────────────────────────────────────────────────────────────┘
  41.  
  42.    d:
  43.    if exist d:\ra\txtfiles\fail.asc del d:\ra\txtfiles\fail.asc
  44.    cd \ra\node1
  45.    ra -m\fd\fd.exe*m -n1 -c2
  46.  
  47. :process
  48.  
  49. REM ┌───────────────────────────────────────────────────────────────┐
  50. REM │ Process is where I trap the errorlevels RA & FD exit with..   │
  51. REM └───────────────────────────────────────────────────────────────┘
  52.  
  53.    if errorlevel 201 goto start
  54.    if errorlevel 200 goto unpackmail
  55.    if errorlevel 90  goto invnet
  56.    if errorlevel 80  goto backup
  57.    if errorlevel 70  goto out
  58.    if errorlevel 60  goto daily
  59.    if errorlevel 55  goto weekly
  60.    if errorlevel 50  goto ranetin
  61.    if errorlevel 45  goto maxmail
  62.    if errorlevel 44  goto almac
  63.    if errorlevel 40  goto vnet
  64.    if errorlevel 15  goto modinit
  65.    if errorlevel 13  goto diskspace
  66.    if errorlevel 12  goto external
  67.    if errorlevel 11  goto internal
  68.    if errorlevel 10  goto finish
  69.    if errorlevel 8   exit
  70.    if errorlevel 7   goto nofossil
  71.    if errorlevel 6   goto xfossil
  72.    if errorlevel 5   goto net&echo
  73.    if errorlevel 4   goto echo_only
  74.    if errorlevel 3   goto net_only
  75.    if errorlevel 2   goto local
  76.    if errorlevel 1   goto error
  77.    if errorlevel 0   goto out
  78.    goto out
  79.  
  80. :restart_quick
  81.  
  82. REM ┌──────────────────────────────────────────────────┐
  83. REM │ This is where I return after a type 15 exit      │
  84. REM └──────────────────────────────────────────────────┘
  85.  
  86.    Ra -R -G
  87.    goto process
  88.  
  89.  
  90. :unpackmail
  91.  
  92. REM ┌─────────────────────────────────────────────────────────────┐
  93. REM │ Before unpacking received mail I check to see if there are  │
  94. REM │ any chatlist's, nodediff's or tic attachs to be processed.  │
  95. REM └─────────────────────────────────────────────────────────────┘
  96.  
  97.    if exist d:\fd\file\chatlist.* goto cdiff
  98.    if exist d:\fd\file\nodediff.* goto ndiff
  99.    if exist d:\fd\file\*.tic goto tick
  100.    if exist d:\fd\file\*.zic goto tick
  101.    goto inmail
  102.  
  103. :cdiff
  104.  
  105. REM ┌───────────────────────────────────────────────────────────────────┐
  106. REM │ Process Chatlist before compiling nodelist                        │
  107. REM └───────────────────────────────────────────────────────────────────┘
  108.  
  109.    d:
  110.    cd \fd\nodelist
  111.    pak e /wa \fd\file\chatlist.*
  112.    if exist d:\fd\file\nodediff.* goto ndiff
  113.    goto diff
  114.  
  115. :ndiff
  116.  
  117. REM ┌────────────────────────────────────────────────────────────────────┐
  118. REM │ Process Nodediff before Compiling Nodelist                         │
  119. REM └────────────────────────────────────────────────────────────────────┘
  120.  
  121.  
  122.    d:
  123.    cd \fd\nodelist
  124.    copy \fd\file\nodediff.*
  125.    xlaxdiff /c
  126.    del j:\ibm\mail\nodelist.zip
  127.    pkzip j:\ibm\mail\nodelist nodelist.0* nodelist.1* nodelist.2* nodelist.3*
  128.    rafile update *.* 75
  129.    goto diff
  130.  
  131. :diff
  132.  
  133. REM  ┌───────────────────────────────────────────────────────────────┐
  134. REM  │ Compile Nodelist for FrontDoor and RemoteAccess               │
  135. REM  └───────────────────────────────────────────────────────────────┘
  136.  
  137.    d:
  138.    cd \fd
  139.    fdnc /F
  140.    cd \ra
  141.    ranode policnet.* rnetlist.* frontnet.*
  142.    if exist d:\fd\file\*.tic goto tick
  143.    if exist d:\fd\file\nodediff.* goto tick
  144.    goto inmail
  145.  
  146. :tick
  147.  
  148. REM ┌────────────────────────────────────────────────────┐
  149. REM │ Toss incoming Tic file attaches to areas           │
  150. REM └────────────────────────────────────────────────────┘
  151.  
  152.    d:
  153.    cd\fmgr
  154.    filemgr mgr
  155.    filemgr scan announce
  156.    cd\ra
  157.    rafile import @hd.lst /ERASE /USysop
  158.    if exist d:\fd\file\*.zic goto tick
  159.    goto inmail
  160.  
  161. :inmail
  162.  
  163. REM  ┌─────────────────────────────────────────────────────────────┐
  164. REM  │  Import incoming mail. Then checking for Areafix requests   │
  165. REM  │  and linking, before running sys-rec.                       │
  166. REM  └─────────────────────────────────────────────────────────────┘
  167.  
  168.    d:
  169.    cd\ra
  170.    trans
  171.    cd\fd
  172.    tosscan
  173.    amgrf286
  174.    if errorlevel 1 Tosscan
  175.    tsutil import
  176.    cd\fmgr
  177.    filemgr mgr
  178.    goto start
  179.  
  180. :net&echo
  181.  
  182. REM ┌───────────────────────────────────────────────────┐
  183. REM │ Export and pack Echomail and Netmail from msgbase │
  184. REM └───────────────────────────────────────────────────┘
  185.  
  186.    D:
  187.    tosscan scan
  188.    tsutil export
  189.    goto out
  190.  
  191. :echo_only
  192.  
  193. REM ┌────────────────────────────────────────┐
  194. REM │ Export and pack Echomail from msgbase  │
  195. REM └────────────────────────────────────────┘
  196.  
  197.    D:
  198.    tosscan scan
  199.    goto out
  200.  
  201. :net_only
  202.  
  203. REM  ┌──────────────────────────────────────┐
  204. REM  │ Export Netmail(s) from the msgbase.  │
  205. REM  └──────────────────────────────────────┘
  206.  
  207.    D:
  208.    tsutil export
  209.    goto out
  210.  
  211. :local
  212.  
  213. REM  ┌────────────────────────────────┐
  214. REM  │ Fire up the BBS in local mode  │
  215. REM  └────────────────────────────────┘
  216.  
  217.    d:
  218.    cd \ra\node1
  219.    ra -l -n1
  220.    goto process
  221.  
  222. :out
  223.  
  224. REM ┌─────────────────────────────────────────────────────────────┐
  225. REM │  I run some utilities and delete some files between calls   │
  226. REM └─────────────────────────────────────────────────────────────┘
  227.  
  228.    if exist j:\ibm\pc\downloa?.* del j:\ibm\pc\downloa?.*
  229.    if exist d:\ra\dobbs*.bat del d:\ra\dobbs*.bat
  230.    if exist d:\ra\dsz.log del d:\ra\dsz.log
  231.    d:
  232.    cd \ra
  233.    ezzsa ezzsa.cfg
  234.    cd \ra\node1
  235.    if exist d:\qmx1\*.pkt goto XRSmail
  236.    goto start
  237.  
  238. :XRSmail
  239.  
  240.    copy d:\qmx1\*.pkt d:\fd\file
  241.    del d:\qmx\*.pkt
  242.    goto inmail
  243.  
  244. :daily
  245.  
  246. REM  ┌─────────────────────────────────────────────────────────────────────┐
  247. REM  │ This is my daily maintenance run. Utilities used are:               │
  248. REM  │ TSutil, Loginfo, Fsumm, Automsg, Popdoor, Remotlog                  │
  249. REM  │ AVTConv, Sys-rec, and RAUser.                                       │
  250. REM  └─────────────────────────────────────────────────────────────────────┘
  251.  
  252.    d:
  253.    cd\ra\node1
  254.    tsutil
  255.    cd\ra
  256.    rafile import @hd.lst /ERASE
  257.    rafile filelist j:\ibm\lists\02440059.txt @allfiles.lst /Bd:\ra\megalist.hdr
  258.    rafile filelist j:\ibm\lists\giflist.txt @gifs.lst /Bd:\ra\megalist.hdr
  259.    rafile filelist j:\ibm\lists\amiga.txt @amiga.lst /Bd:\ra\megalist.hdr
  260.    rafile filelist j:\ibm\lists\pcfiles.txt @pcfiles.lst /Bd:\ra\megalist.hdr
  261.    rafile filelist j:\ibm\lists\bbsfiles.txt @bbsfiles.lst /Bd:\ra\megalist.hdr
  262.    rafile filelist j:\ibm\lists\stfiles.txt @st.lst /Bd:\ra\megalist.hdr
  263.    rafile filelist j:\ibm\lists\yukonho.new @allfiles.lst /D7
  264.    rafile filelist j:\ibm\lists\mac.txt @mac.lst /Bd:\ra\megalist.hdr
  265.    pkzip j:\ibm\lists\02440059 j:\ibm\lists\02440059.txt
  266.    pkzip j:\ibm\lists\giflist j:\ibm\lists\giflist.txt
  267.    pkzip j:\ibm\lists\yukonnew j:\ibm\lists\yukonho.new
  268.    lha a j:\ibm\lists\amiga j:\ibm\lists\amiga.txt
  269.    pkzip j:\ibm\lists\pcfiles j:\ibm\lists\pcfiles.txt
  270.    pkzip j:\ibm\lists\bbsfiles j:\ibm\lists\bbsfiles.txt
  271.    pkzip j:\ibm\lists\stfiles j:\ibm\lists\stfiles.txt
  272.    pkzip j:\ibm\lists\mac j:\ibm\lists\mac.txt
  273.    rafile update *.* 93
  274.    cd\ra
  275.    cd\ra\txtfiles
  276.    move onceonly.* d:\temp
  277.    avtconv *.ans
  278.    move d:\temp\onceonly.* d:\ra\txtfiles
  279.    d:\ra\ra_activ.exe /c /e
  280.    cd\ra
  281.    rauser -p
  282.    rauser -s
  283.    cd\ra\rats
  284.    rmu.exe
  285.    cd\ra\log
  286.    pkzip ra d:\ra\node1\ra.log
  287.    pkzip fd d:\ra\fd.log
  288.    nmdate d:\ra\log\ra.zip
  289.    nmdate d:\ra\log\fd.zip
  290.    del d:\ra\node1\ra.log
  291.    del d:\ra\fd.log
  292.    cd\fd
  293.    copy setup.fd fd.sys
  294.    goto start
  295.  
  296. :weekly
  297.  
  298. REM ┌──────────────────────────────┐
  299. REM │ Weekly maintenance done here │
  300. REM └──────────────────────────────┘
  301.  
  302.    d:
  303.    cd\ra\node1
  304.    tsutil
  305.    xcopy \ra\*.ra c:\rabak
  306.    xcopy *.ra c:\rabak
  307.    copy run1.bat c:\rabak
  308.    cd\ra\log
  309.    move *.zip c:\rabak\logbak
  310.    goto start
  311.  
  312.  
  313. :ranetin
  314.  
  315. REM ┌─────────────────────────────────────────────┐
  316. REM │ Prepare weekly Ranetlist segment submission │
  317. REM └─────────────────────────────────────────────┘
  318.  
  319.  
  320.    d:
  321.    cd\fd
  322.    makenl
  323.    move net7449.* d:\fd\file
  324.    cd\fmgr
  325.    filemgr scan
  326.    goto start
  327.  
  328.  
  329. :backup
  330.  
  331. REM ┌─────────────────────────────────────────────────────────┐
  332. REM │  This is for automated backup's of the BBS partition    │
  333. REM └─────────────────────────────────────────────────────────┘
  334.  
  335.  
  336.     d:
  337.     cd\temp
  338.     copy c:\config.sys
  339.     copy c:\autoexec.bat
  340.     cd\
  341.     ctback d:\*.* /v:d /o /s
  342.     goto start
  343.    
  344.  
  345. :maxmail
  346.  
  347. REM ┌────────────────────────────────────────────────────────────────┐
  348. REM │ This is where I use Robocomm to pick up ILink mail and use     │
  349. REM │ Max to process it into the msgbase                             │
  350. REM └────────────────────────────────────────────────────────────────┘
  351.  
  352.     D:
  353.     del D:\ra\max\work\almac.msg
  354.     del D:\ra\max\work\almac.rep
  355.     cd \ra\max
  356.     max scan
  357.     cd \ra\max\work
  358.     ren almac.rep almac.msg
  359.     pkzip almac.rep almac.msg
  360.     cd\ra\max\out
  361.     copy \ra\max\work\almac.rep
  362.     cd\ra\max\work
  363.     del *.rep
  364.     del *.msg
  365.     cd\ra\max
  366.     robocomm /aAlmac /r
  367.     cd \ra\max\out
  368.     del *.rep
  369.     cd \ra\max\work
  370.     pkunzip a*.q* M*.*
  371.     cd \ra\max
  372.     max toss
  373.     cd \ra\max\work
  374.     del *.q*
  375.     del m*.*
  376.     goto start
  377.  
  378. :almac
  379.  
  380.     d:
  381.     cd\ra\max
  382.     robocomm /aAlmac /r
  383.     goto start
  384.  
  385.  
  386. :invnet
  387.  
  388. REM ┌───────────────────┐
  389. REM │Incoming vnet call │
  390. REM └───────────────────┘
  391.     d:
  392.     cd\vbbs
  393.     VNET 1 /HOST
  394.     goto start
  395.  
  396. :vnet
  397.  
  398. REM ┌───────────────────────┐
  399. REM │ Automated vnet pickup │
  400. REM └───────────────────────┘
  401.  
  402.     d:
  403.     cd\vbbs
  404.     call d:\vbbs\net2.bat
  405.     cd\fd
  406.     tosscan toss
  407.     tsutil
  408.     goto start
  409.  
  410.  
  411. REM ┌───────────────────────────────────────────────────────────┐
  412. REM │ This is where I log and report exits from the batch file  │
  413. REM └───────────────────────────────────────────────────────────┘
  414.  
  415.  
  416. :xfossil
  417.     Echo Incorrect Fossil version..................Bombing out
  418.     goto finish
  419. :nofossil
  420.     Echo No Fossil Present.........................Bombing out
  421.     goto finish
  422. :modinit
  423.     Echo Frontdoor unable to init Modem............Bombing out
  424.     goto finish
  425. :diskspace
  426.     Echo Insufficient disk space for Frontdoor.....Bombing out
  427.     goto finish
  428. :error
  429.     Echo ERROR.....................................Bombing out
  430.     goto finish
  431. :external
  432.     Echo External error in Frontdoor...............Bombing out
  433.     goto finish
  434. :internal
  435.     Echo Internal error in Frontdoor...............Bombing out
  436.     goto finish
  437. :finish
  438.    cd \ra\node1
  439.    echo ..
  440.    echo Yukon Ho! node1 is bye bye
  441.